<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="VectorX">
    <meta name="keywords" content="表格">
    <title>表格</title>
    <style>
    </style>
</head>

<body>
    <table border="1" width="50%" align="center">
        <!--在table中使用tr表示表格中的一行，有几个tr就有几行-->
        <tr>
            <!--在tr中使用td表示一个单元格，有几个td就有几个单元格-->
            <td>A1</td>
            <td>B1</td>
            <td>C1</td>
            <td>D1</td>
        </tr>
        <tr>
            <td>A2</td>
            <td>B2</td>
            <td>C2</td>
            <!--rouspan 纵向的合并单元格-->
            <td rowspan="2">D2</td>
        </tr>
        <tr>
            <td>AB</td>
            <td>B3</td>
            <td>C3</td>
        </tr>
        <tr>
            <td>A4</td>
            <td>B4</td>
            <!-- colspan横向的合并单元格 -->
            <td colspan="2">C4</td>
        </tr>
    </table>
</body>

</html>